<div class="campaigns" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>广告中心</li>
        <li>广告投放</li>
    </ol>
    <div class="panel">
        <div class="searchWapper">
            <div class="form-group searchLump search-condition">
                <div class="searchTitle">筛选：</div>
                <div class="btn btn-xs condition" ng-repeat="(key,value) in search" ng-if="payType[value]||status[value]&&(key=='payType'||key=='status')">
                    <a href="javascript:void(0);" class="close" ng-click="deletes(key)">
                        <span aria-hidden="true">&times;</span>
                    </a>
                    {{payType[value]}}
                    {{status[value]}}
                </div>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">付费：</div>
                <label class="btn btn-xs" ng-class="{on : search.payType == key}"  ng-repeat="(key, value) in payType">
                    <input type="radio" class="hide" name="radioPay" ng-value="key" ng-model="search.payType" ng-change="searchChange()">{{value}}
                </label>
            </div>
            <div class="form-group searchLump">
                <div class="searchTitle">状态：</div>
                <label class="btn btn-xs" ng-class="{on : search.status == key}" ng-repeat="(key, value) in status">
                    <input type="radio" class="hide"  name="radioStatus"  ng-value="key" ng-model="search.status" ng-change="searchChange()">{{value}}
                </label>
            </div>
        </div>
        <div class="bg-20"></div>

        <div class="panel-heading panel-style">
            <div class="row panel-row" style="padding-bottom: 4px">
                <div class="col-lg-3">
                    <div class="input-group input-group-sm">
                        <input type="text" class="form-control" name="keyword" ng-model="keyword" placeholder="搜索">
						<span class="input-group-btn btn-bearch">
							<button class="btn btn-default" type="button" ng-click="searchClick(keyword)">
                                <i class="glyphicon glyphicon-search"></i>
                            </button>
						</span>
                    </div>
                </div>
<!--                <div class="search-operation pull-right">
                    <a ui-sref="campaigns.campaignsCreate" class="btn">
                        <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                    </a>
                    <a href="javascript:void(0);" class="btn" ng-click="delTableData()">
                        <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                    </a>
                </div>-->
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>序号</th>
                    <th>ID</th>
                    <th>广告计划</th>
                    <th>推广组</th>
                    <th>广告形式</th>
                    <th>广告主</th>
                    <th>排期</th>
                    <th>更新时间 </th>
                    <th>付费</th>
                    <th>权重</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr  ng-repeat="campaigns in campaignsList.pageList">
                   <!-- <td><input type="checkbox" id="{{$index}}" class="chk_1">
                        <label for="{{$index}}"></label></td>-->
                    <td>{{$index+1}}</td>
                    <td>{{campaigns.campaignId}}</td>
                    <td><a ui-sref="campaigns.detail({campaignsId:campaigns.campaignId})"><p class="list-rlue" ng-bind-html="$sce.trustAsHtml(campaigns.campaignName)"></p></a></td>
                    <td><a ui-sref="campaigns.promotionGroup({campaignsId:campaigns.campaignId,advertiserId:campaigns.advertiserId,pageNo:1,pageSize:10})"><p class="list-rlue">{{campaigns.count}}</p></a></td>
                    <td><a class="{{campaigns.adStyle|adStyleFilter}}" aria-hidden="true" title="{{campaigns.adStyle==81?'图片广告':campaigns.adStyle==82 ? '音图广告':campaigns.adStyle==83 ? '视频广告':'纯音广告'}}"/></td>
                    <td><span ng-bind-html="$sce.trustAsHtml(campaigns.shortName)"></span></td>
                    <td class="small">{{campaigns.countDays}}天<p>{{campaigns.startDay?campaigns.startDay+'~':''}}{{campaigns.endDay}}</p></td>
                    <td>{{campaigns.uTime}}</td>
                    <td>{{campaigns.payType?table[campaigns.payType]:'----'}}</td>
                    <td>{{campaigns.weight}}</td>
                    <td>{{table[campaigns.statusView]}}</td>
                    <td>
                        <a href="javascript:void(0);" ng-if="(campaigns.status == 3 && campaigns.statusView != 8)|| campaigns.statusView != 8" ng-click="changeStatus(campaigns)" class="time-out">
                            {{campaigns.status == 3 ? "执行" : "暂停"}}
                        </a>
                        <span class="time-out" ng-if="campaigns.statusView == 8" >
                            ---
                        </span>

                        <a ui-sref="campaigns.statistics({campaignsId:campaigns.campaignId,pageNo:1,pageSize:10})">统计</a></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationConf"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
